var steps = [
	new OC.DelayStep ({
		object : "a.btn_error",
		action : "click",
		delay : 2000
	}),
	new OC.DelayStep ({
		object:"#J_reg_username",
		action : "val",
		param : "d:username"
	}),
	new OC.DelayStep ({
		object:"#J_reg_password",
		action : "val",
		param : "d:password"
	}),
	new OC.DelayStep ({
		object:"#J_reg_repassword",
		action : "val",
		param : "d:password"
	}),
	new OC.DelayStep ({
		object:"#J_reg_email",
		action : "val",
		param : "d:email"
	}),
	new OC.DelayStep ({
		object:".btn.btn_big.btn_submit.mr20",
		action : "click"
	}),
	new OC.EventStep ({
		object:"a:contains(退出)",
		action : "click",
		condition : new OC.Condition(":contains(恭喜您)") ,
		overtime : 20000
	})
]
OC.newPrcs({max_loops:10});
OC.cur_process.addDict("http://localhost/testweb/json/bbs.json");
for( var i=0; i<steps.length; i++ ){
	OC.cur_process.addStep( steps[i] );
}
OC.play();